package com.bltec.emergency.service.mgrService;

import com.bltec.emergency.model.User;

import java.util.List;

public interface UserService {


    boolean add(User user);

    boolean deleteUserById(Long userId);

    boolean updateUserById(User user);

    Long getIdByUserName(String userName);

    User getUserById(Long userId);

    String getPassWordByUserName(String userName);

    List<User> getAll();

    User getUserByUsername(String username);

    Long getRoleIdByUserName(String userName);

    List<String> selectAllUsername();
















    /*
    private final UserDao userDao;

    *//**构造器注入，防止出现空指针*//*
    public UserService(UserDao userDao) {
        this.userDao = userDao;
    }

    public boolean add(User user){
        if(user!=null){
            userDao.save(user);
            return true;
        }else return false;
    }
  *//*  public boolean updateById(Integer userId){return userDao.updateByOne(userId.toString());}*//*
    public Integer getIdByUserName(String userName){return userDao.findByUsername(userName).getId();};
    public User getById(Integer userId){return userDao.getOne(userId);}
    public String getPassWordByUserName(String userName){
        return userDao.findByUsername(userName).getPassword();
    }
    public List<User> getAll(){return userDao.findAll();}
    public List<User> getUserByName(){return userDao.findAll();}
    public Integer getRoleIdByUserName(String userName){return userDao.findByUsername(userName).getRoleId();}*/
}
